Print control apparatus and method and storage medium

ABSTRACT

A print control apparatus which can print and output bit map image data while executing a decompressing process without storing compressed bit map image data into a memory is provided. The print data is directly outputted to a recorder and printed without storing into a frame buffer or is stored into the frame buffer and outputted and printed in accordance with the kind of print data.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates to a print control apparatus for outputting image data.

[0003] 2. Related Background Art

[0004] Hitherto, compressed image data is decompressed and is temporarily stored into a memory and the data in the memory is again read out and is outputted as video data to a recorder.

[0005] In the above-mentioned prior art, however, since decompressed bit map image data is stored into the memory, there is a drawback such that a use frequency of a data bus increases.

SUMMARY OF THE INVENTION

[0006] It is, therefore, an object of the invention to provide a print control apparatus which can print and output bit map image data while executing a decompressing process without storing the bit map image data which was byte run length compressed into a memory.

[0007] Another object of the invention is to provide a print control apparatus in which in accordance with a kind of data included in print data, the data can be directly outputted to a recorder without storing into a frame buffer or the data can be stored into the frame buffer and then outputted.

[0008] For the purpose of accomplishing the above objects, according to the invention, an FIFO is provided as a data buffer between a memory and a decompressor circuit and a cycle time for input/output is set so that a cycle time for writing is equal to or faster than a cycle time for reading.

[0009] A capacity of the buffer is equal to or larger than the product of the worst value of data compression and an amount of parallel data which is given to a video output per once, so that the compressed data is decompressed by the decompressor circuit without interrupting video data to be printed and outputted, thereby forming bit map image data.

[0010] In the print control apparatus for receiving print data, outputting it to a recorder, and printing, when one compression image data exists in one band, the data is not stored in the frame buffer but is directly outputted to the recorder and, when a plurality of image data or another data exists in one band, the data is stored into the frame buffer and is outputted.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 is a block diagram showing a system construction in each embodiment of the invention;

[0012]FIG. 2 is a block diagram showing a construction of a data decompressor in the embodiment 1 of the invention;

[0013]FIG. 3 is a block diagram showing a construction of a data decompressor in the embodiment 2 of the invention;

[0014]FIG. 4 is a flowchart showing the operation of a print controller in the embodiments 1 and 2 of the invention;

[0015]FIG. 5 is a flowchart showing the whole operation of a print controller in the embodiment 3 of the invention;

[0016]FIG. 6 is a flowchart showing the operation to receive data in the operations of the print controller in the embodiment 3 of the invention;

[0017]FIG. 7 is a flowchart showing the operation to form a band buffer in the operations of the print controller in the embodiment 3 of the invention;

[0018]FIG. 8 is a flowchart showing the operation to form a frame buffer in the operations of the print controller in the embodiment 3 of the invention; and

[0019]FIG. 9 comprised of FIG. 9A and FIG. 9B, is a flowchart showing the operation to output an image in the operations of the print controller in the embodiment 3 of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0020] [Embodiment 1]

[0021]FIG. 1 is a constructional diagram for explaining the operation of a print control apparatus in each embodiment of the invention. In FIG. 1, reference numeral 101 denotes a host computer; 102 a print controller; 103 a CPU for controlling the print controller 102; 104 an ROM in which a control program of the print controller 102 has been stored; 105 a host interface (I/F) for controlling communication with the host computer 101; 106 an RAM; 107 a data decompressor; 108 an arbiter for arbitrating accesses to the RAM 106; 109 an engine I/F; and 110 a recorder for actually printing onto a paper.

[0022]FIG. 2 is an internal constructional diagram of the data decompressor 107 in the embodiment 1. In FIG. 2, reference numeral 201 denotes an FIFO write controller; 202 a flip-flop for holding data; 203 a data selector; 204 an FIFO memory; 205 a data decompressor circuit; 206 a flip-flop for holding the decompressed data; and 207 a flip-flop for a flag indicating that data was written into the flip-flop 206.

[0023] A data compressing method which is used in the embodiment will now be explained.

[0024] (1) Data having repetition:

[0025] (a) Command (1 byte): Designates the number of times of successive appearance.

[0026] A value to be designated is given by “[(the number of times of appearance)−1]×(−1)” and is set to a value within a range from FFh (2 times) to 81h (128 times).

[0027] (b) Data (1 byte): Writes data which appears.

[0028] (2) Data having no repetition:

[0029] (a) Command (1 byte): Designates the number of bytes of data having no repetition.

[0030] A value to be designated is given by “(the number of bytes)−1” and is set to a value within a range from 00h (1 byte) to 7Fh (128 bytes).

[0031] (b) Data portion (1 byte or more): Writes data having no repetition.

[0032] In FIG. 1, when compressed image data, for example, the foregoing image data compressed by a pack bits compressing form is transmitted from the host computer 101, the CPU 103 transfers the data to the RAM 106 through the host I/F 105. The receiving operation is performed until the reception of the compression image data as much as one page is completed. When the data of one page is stored, the CPU 103 activates the data decompressor 107 and engine I/F 109. The activated data decompressor 107 reads out the compression data held in the RAM 106 and decompresses the data. The engine I/F 109 reads the decompressed data, executes a parallel/serial conversion, and outputs video data to the recorder 110.

[0033] The operation of the print control apparatus of each embodiment of the invention will now be described with reference to a flowchart of FIG. 4. The print controller 102 waits for reception of the data from, for example, the host computer 101 as an external apparatus (step S1) and transfers the data to the RAM 106 (step S2). Subsequently, a check is made to see if the data as much as one page has been accumulated in the RAM 106 (step S3). If YES, the data in the RAM 106 is analyzed (step S4). A check is made to see if the data is image data (step S5). As a result of discrimination in step S5, when the data is not the image data, the other process is performed. In case of the image data, the data decompressor 107 is started (step S6). Subsequently, the engine I/F 109 and recorder 110 are started (step S7) and the printing operation is performed. The apparatus waits for the completion of the printing of one page (step S8). The printing of one page is now finished.

[0034] As mentioned above, when the data decompressor 107 is started, in FIG. 2, the FIFO write controller 201 outputs a DMA address and a DREQ (DMA REQuest) signal to the arbiter 108 (refer to FIG. 1). When the data is read out from the RAM 106, the arbiter 108 outputs the data together with a DACK (Data ACKnowledge) signal to the data decompressor 107. The FIFO write controller 201 which received the DACK signal sets the DREQ signal to be false and allows the flip-flop 202 to hold the data.

[0035] First, data of A is written into the FIFO memory 204 through the data selector 203. Subsequently, the data selector 203 is switched to B and the data is written into the FIFO memory 204. The FIFO write controller 201 executes the DMA until a /FULL signal in the FIFO memory 204 is outputted (until the FIFO memory is full), writes the data into the FIFO memory 204, and executes such an operation each time the /FULL signal becomes false. The operation is continued until the data decompressor circuit 205 finishes the operation and outputs an END signal.

[0036] The data decompressor circuit 205 reads out the compressed data from the FIFO memory 204, decompresses the data, writes the data into the D flip-flop 206, and also writes the data into the flip-flop 207 for flag. When the data of two bytes is set into the flip-flop 206, a DATAFULL signal is outputted and inputted to the data decompressor circuit 205. When the DATAFULL signal is inputted, the data decompressor circuit 205 stops the operation. When the engine I/F 109 reads the data set in the D flip-flop 206, a /DCLR signal is outputted and a signal (Q output) of the D flip-flop 207 for flag is set to “L”, so that the DATAFULL signal is set to be false. The data decompressor circuit 205 restarts the operation and sets the data to the D flip-flop 206. The above operation is continued until the printing of one page is completed.

[0037] By setting a cycle time for writing data into the FIFO memory 204 to be equal to or faster than a cycle time for reading data, as for a capacity of the FIFO memory 204, in the pack bits compression form shown in the embodiment, there is a case where an amount of data after compression increases as compared with an amount of data before compression. An increase rate (the worst value) is equal to 1.33 (compression data of four bytes is needed to form data of three bytes). From this value, it will be understood that now assuming that the D flip-flop 206 has a capacity of two bytes, so long as the FIFO memory 204 has a capacity of (2×1.33=3 bytes or more), and now assuming that the flip-flop 206 has a capacity of four bytes, so long as the FIFO memory 204 has a capacity of (4×1.33=6 bytes or more), a preparing speed of the data decompressed by the data decompressor 205 can be made faster than a speed of getting the video data by the engine I/F 109 when it is seen as an average. The data can be printed and outputted without interrupting the image.

[0038] [Embodiment 2]

[0039]FIG. 3 is a constructional diagram of the data decompressor of the embodiment 2. In the diagram, reference numeral 401 denotes a Dual Port RAM (D. P. RAM); 402 a D. P. RAM controller; 403 a Write counter; and 404 a Read counter. The operation of the data decompressor 107 in the embodiment will now be explained. When the data decompressor 107 is started, the D. P. RAM controller 402 outputs the DMA address and DREQ (DMA REQuest) signal to the arbiter 108.

[0040] When the data is read out from the RAM 106, the arbiter 108 outputs the data together with the DACK (Data ACKnowledge) signal to the data decompressor 107. The D. P. RAM controller 402 which received the DACK signal sets the DREQ signal to be false, writes the data into the D. P. RAM 401, and counts up the Write counter 403. The D. P. RAM controller 402 checks a difference between count values of the Write counter 403 and Read counter 404. When there is a vacant area in the memory, the controller 402 outputs the DREQ signal and writes the data into the D. P. RAM 401.

[0041] The data decompressor 205 reads out the compressed data from the D. P. RAM 401, decompresses the data, writes the decompressed data into the D flip-flop 206, and counts up the Read counter 404. In a manner similar to the first embodiment, the decompressing operation is repeated until the end of the print data of one page. In the embodiment as well, the cycle time for writing data into the D. P. RAM 401 is set to be equal to or faster than the cycle time for reading out data. The RAM 401 is constructed in a manner such that the capacity is equal to or larger than the value of [(the amount of data to be transferred to the engine I/F 109 per time)×(the increase rate of data)].

[0042] [Embodiment 3]

[0043] The embodiments 1 and 2 particularly relate to the print control apparatus for printing and outputting bit map image data while executing the decompressing process to the bit map image data which was byte run length compressed. The embodiment 3, however, relates to the whole control process of the print control apparatus in which in accordance with a kind of data included in print data, the data can be directly outputted to the recorder without being stored into a frame buffer or the data can be stored in the frame buffer and then outputted.

[0044] The operation of the print control apparatus of the embodiment 3 will now be explained. When the host computer 101 outputs print data formed in an application program, the print data outputted by the application is outputted to the print controller 102 via a printer driver as a software program in the host computer. The printer driver decides a size (the number of lines) which is processed by dividing one page into a plurality of areas from the memory capacity of the recorder 110 and forms the print data in correspondence to the decided size. The printer driver 102 classifies the print data transferred from the application into character information, rule information, and image information other than the above information and executes processes suitable for them, respectively, as will be described hereinbelow.

[0045] As for the character information, character codes, and page information such as size, printing position, and the like are processed and bit map data of font is compressed, thereby forming font data. The compressed font data is outputted to the print controller 102 by collecting a plurality of fonts to be used. The print controller 102 stores the received data into a specific area of the RAM 106 and uses such an area as a font cache. Therefore, when a character of the same font is instructed in the page information, the compression font data is extracted from the font cache and is decompressed and is stored into the frame buffer.

[0046] The rule information is processed as vector or image information and is outputted to the print controller 102. The other data is byte run length compressed as image data and is outputted to the print controller 102.

[0047] The print data is classified to the abovementioned three information every band and the print information is formed. The host computer 101 outputs the print information to the print controller 102. The print controller 102 receives the information through the host I/F 105 and, in the received data, the compressed font data is transferred to the font cache area and the other data is transferred to a reception buffer area by the CPU 103.

[0048] When all of the print information of one band is received, the CPU 103 analyzes this data and discriminates whether the band has been formed by one image information or includes a plurality of image information or character information and rule information. When one band is formed by one image information, as shown in the embodiments 1 and 2, with respect to this band, a frame buffer is not formed but video data is directly formed (decompressed) from the byte run length compressed data and is outputted to the recorder 110.

[0049] When one band is made up of a plurality of image information or character information and rule information, a band buffer (page buffer) is formed from the information of the band. When print data of a plurality of bands is received and the band buffer is formed and all of the band buffers as much as one page are formed, the CPU 103 designates compression image data of the first band constructing one page, sets an output destination of the decompressed data into the RAM 106, and starts the data decompressor 107.

[0050] If there are a plurality of compression images, all of them are decompressed by the data decompressor 107 and stored into a first frame buffer area in the RAM 106. The rule information and character information are processed and stored into the first frame buffer area. Similarly, the second band is stored into a second frame buffer area. When all of the data in the second frame buffer is stored, the CPU 103 sets an output of the first frame buffer into the engine I/F 109, starts the recorder 110, and prints the print data in the first frame buffer.

[0051] After completion of the output of the print data of the first frame buffer, an output of the second frame buffer is soon set into the engine I/F 109 and the recorder 110 is resumed. The CPU 103 stores the data in a band buffer of the third band into the first frame buffer.

[0052] The compression data divided into a plurality of bands is processed while repeating the above operations and switching two frame areas and one page is printed and outputted.

[0053] The foregoing embodiment 3 will now be described in detail with reference to flowcharts shown in FIGS. 5 to 9A and 9B. Programs regarding the flowcharts in FIGS. 5 to 9A and 9B are stored into the ROM 104 and controlled by the CPU 103.

[0054]FIG. 5 is a diagram showing a flow of the whole operation. As shown in FIG. 5, the print controller 102 first receives the data (step S20), generates a band buffer (step S30), generates a frame buffer (step S40), and finally outputs an image (step S60). The data reception, formation of the band buffer, formation of the frame buffer, and image output will now be described hereinbelow with reference to FIGS. 6, 7, 8 and FIGS. 9A and 9B, respectively. “Band” which is used in the embodiment may be any one of an area of one page and an area obtained by dividing one page.

[0055] As shown in FIG. 6, in the data reception, a check is made to see if the data is compression font data (step S21). If NO, the data is transferred to the reception buffer area (step S22). A check is made to see if the data transfer of one band has been finished (step S24). If NO, the processing routine is returned to step S21. When the data is the compression font data in step S21, the data is transferred to a font cache area (step S23).

[0056] As shown in FIG. 7, in the formation of the band buffer, the apparatus waits for the end of the reception of one band (step S31) and forms a band buffer (step S32). After that, a check is made to see if all of the reception data has been processed (step S33). If NO, the processing routine is returned to step S31 and advances to steps S32 and S33 after that. Those steps are repeated, all of the reception data is processed, and the operation to form the band buffer is finished.

[0057] As shown in FIG. 8, in the formation of the frame buffer, a check is made to see if image data exists in the band (step S41). If YES, a check is made to see if it is formed by one image data (step S42). If YES, the operation of the formation of the frame buffer is finished at this time point. If NO, one image data is decompressed and stored into the frame buffer (step S43). After that, a check is made to see if there is other image data. If YES, the processing routine is returned to step S43 and advances to step S44. The apparatus waits until there is no other image data which is not decompressed.

[0058] When it is decided in step S41 that no image data exists in the band and when it is determined in step S44 that all of the image data has been decompressed, a check is made to see if rule data exists in the band (step S45). If YES, a ruled line is generated and stored in the frame buffer (step S46). After that, a check is made to see if there is any other rule data (step S47). If YES, the processing routine is returned to step S46 and advances to step S47 and the apparatus waits until there is no other rule data which is not stored in the frame buffer.

[0059] When it is decided in step S45 that there is no rule data in the band and when it is determined in step S47 that all of the rule data has been stored in the frame buffer, a check is made to see if there is character data in the band (step S48). When there is character data, the character data is generated and stored into the frame buffer (step S49). After that, a check is made to see if there is any other character data (step S50). If YES, the processing routine is returned to step S49 and advances to step S50. The apparatus waits until there is no other character data which is not stored in the frame buffer. When it is decided in step S48 that there is no character data in the band and when it is determined in step S50 that all of the character data has been stored in the frame buffer, the operation to form the frame buffer is finished.

[0060] As shown in FIGS. 9A and 9B, in the image output, after waiting for the end of the storage of the first and second bands (step S61), a check is made to see if the first frame buffer has been formed by one compression image data (step S62). If NO, the apparatus is set into a mode to output the bit map data stored in the frame buffer (step S63). If YES, the apparatus is set to a mode for directly decompressing the compression image data and outputting (step S64). After that, the apparatus instructs the engine I/F to generate the first frame buffer (step S65). The apparatus waits for the end of the output of the data from the first frame buffer (step S66).

[0061] When the mode to directly decompress and output the data is set in step S64, on the basis of the output instruction in step S65, the engine I/F requests the decompressor to generate the data and the decompressor decompresses the compressed data and directly outputs it to the engine I/F. When the mode to output the bit map data is set in step S63, the engine I/F requests the decompressor to generate the data and the decompressor requests the arbiter to output the bit map data stored in the RAM to the engine I/F.

[0062] After completion of the output of the first frame buffer, a check is made to see if the output of the data of one page has been finished (step S67). When it is not finished, a check is made to see if the data in the next frame buffer has been formed by one compression image data (step S68). If NO, the apparatus is set to the mode to generate the bit map data (step S69). If YES, the apparatus is set to the mode for directly decompressing the compression image data and outputting (step S70).

[0063] After that, the apparatus instructs the engine I/F to output the data of the next frame buffer (step S71) and instructs the storage of the data of the next band buffer (step S72). After that, the apparatus waits for the end of the storage (step S73) and waits for the end of the output of the data of frame buffer which is being outputted (step S74). The processing routine is returned to step S67. After that, steps S68 to S74 are repeated until the output of the data of one page is finished. After completion of the data output of one page, the operation of the image output is finished. Although the discrimination in each of steps S62 and S68 has been performed every band in the embodiment, it can be also executed on a page unit basis for simplicity of processes.

[0064] According to the invention as described above, the bit map data can be printed and outputted while executing the decompressing process without storing the bit map image data which was byte run length compressed into the memory.

[0065] According to the invention, a print control apparatus which can directly output the data to the recorder without storing into the frame buffer or can store the data into the frame buffer and output in accordance with the kind of data included in the print data is obtained. 

What is claimed is:
 1. A print control apparatus comprising: a memory for holding compressed data; a decompressor for performing a decompressing operation of the compressed data; an engine interface for outputting said decompressed data to a printer engine; and a buffer provided between said memory and said decompressor, wherein said buffer has a capacity which is equal to or larger than a product of a worst value of a compression ratio of a data compression and an amount of data that is transmitted to a video interface per time.
 2. An apparatus according to claim 1, wherein a cycle time to write data into said buffer is equal to or faster than a cycle time to read out the data by said decompressor.
 3. An apparatus according to claim 1, further having a printer engine for printing on the basis of the data decompressed by said decompressor.
 4. A print control apparatus in which a data dedompressor receives compressed data from a memory and decompresses said data and outputs the decompressed data to a recorder, wherein said data decompressor comprises: a first buffer memory for temporarily holding and outputting the compressed data; a first buffer memory controller for inhibiting an input of the data to said first buffer memory when said first buffer memory is full and for resuming the input of the data to the first buffer memory when the full state of the first buffer memory is released; the data decompressor to which the data outputted from said first buffer memory is inputted and which decompresses said data and outputs; a second buffer memory for temporarily holding the data outputted from said data decompressor and outputting said data to the recorder; and data decompressor control means for detecting an output of the data from said data decompressor to said second buffer memory and outputting a data full signal indicating that said data decompressor is full to the data decompressor, and said data decompressor inhibits the output of the data to said second buffer memory when the data full signal is received from said data decompressor control means and resumes the output of the data to said second buffer memory when the data full signal is released.
 5. An apparatus according to claim 4, wherein said first buffer memory is an FIFO memory for temporarily holding the data and for outputting the full signal to indicate the full state when said memory enters the full state, and said first buffer memory controller is an FIFO write controller for controlling said FIFO memory in a manner such that when the full signal from said FIFO memory is received, the input of the data from the memory to said FIFO memory is inhibited and, when the full signal is released, the input of the data from the memory to the FIFO memory is resumed.
 6. An apparatus according to claim 5, further having a third buffer memory for temporarily holding the data from the memory, and wherein the data is inputted from said third buffer memory to said FIFO memory.
 7. An apparatus according to claim 4, wherein said first buffer memory is a dual port RAM for temporarily holding data, and said first buffer memory controller comprises: a write counter for counting the number of inputting times of the data to said dual port RAM; a read counter for counting an output of the data from said dual port RAM; and a dual port RAM controller for obtaining a difference between a count value of said write counter .and a count value of said read counter, for discriminating whether said dual port RAM is full or not, for inhibiting the input of the data from the memory to the dual port RAM when the dual port RAM is full, and for resuming the input of the data from the memory to the dual port RAM when the full state is released.
 8. An apparatus according to claim 4, wherein said second buffer memory is a D flip-flop for temporarily holding data, and said data decompressor control means is a D flip-flop for a flag for detecting a state in which the data in said D flip-flop is held so that it can be taken out, for outputting said data full signal, for taking out the data from said D flip-flop, for detecting a state in which new data can be input into said D flip-flop, and for releasing said data full signal.
 9. An apparatus according to claim 4, wherein a printer engine for executing a printing on the basis of data is further provided in said recorder to which the data from said second buffer memory in said data decompressor is inputted.
 10. A print control apparatus for receiving print data, outputting to a recorder, and allowing the recorder to print, comprising: means for discriminating whether data in one area is formed by one compression image data or not; and means for controlling in a manner such that when it is decided that the data in one area is formed by one compression image data, said image data is not stored into a frame buffer but is decompressed and is directly outputted to said recorder and is printed, and when it is determined that the data in one area is formed by a plurality of image data or other data, each of said data is decompressed and stored into the frame buffer or the decompressed image data and image data corresponding to other data are stored and outputted to the recorder and are printed.
 11. An apparatus according to claim 10, wherein said other data is rule data.
 12. An apparatus according to claim 10, wherein said other data is character data.
 13. An apparatus according to claim 10, wherein said area is a band area obtained by dividing one page.
 14. An apparatus according to claim 10, wherein said area is an area of one page.
 15. A print control method of receiving print data and outputting said print data to a recorder and allowing the print data to be printed, wherein when one compression image data exists in one area, said data is not stored into a frame buffer but is decompressed and is directly outputted to said recorder and is printed, and when a plurality of image data or other data exists in one area, each of them is decompressed and stored into the frame buffer or the decompressed image data and image data corresponding to said other data are stored and outputted to the recorder and are printed.
 16. A storage medium which stores print control program for receiving print data and outputting said print data to a recorder and allowing said recorder to print and which can be read by a computer, wherein when one compression image data exists in one area, said data is not stored into a frame buffer but is decompressed and is directly outputted to said recorder and is printed, and when a plurality of image data or other data exists in one area, each of them is decompressed and stored in the frame buffer or the decompressed image data and image data corresponding to said other data are stored and outputted to the recorder and are printed. 